import yaml
from csagent.core.config.schema import AgentConfig  

def load_agent_config(config_path: str) -> AgentConfig:
        """从YAML配置文件创建Agent"""
        with open(config_path) as f:
            config_data = yaml.safe_load(f)
        config = AgentConfig(**config_data)
        return config